1. Field of the Invention
The present invention relates to a numerical controller for controlling a feed rate based on a spindle load.
2. Description of the Related Art
A technique has been known which improves cutting speed and cutting tool life by controlling a feed rate such that a spindle load becomes constant (for example, International Publication No. WO94/14569 and the like). There are various conceivable methods for feed rate control. Generally, PID control is widely used as control for maintaining a controlled value at a constant value. Output by PID control can generally be calculated by the following equation (1):
                                          O            ⁡                          (              t              )                                =                                                    K                p                            ⁢                                                e                  L                                ⁡                                  (                  t                  )                                                      +                                          ∫                                  t                  0                                t                            ⁢                                                K                  i                                ⁢                                                      e                    L                                    ⁡                                      (                    t                    )                                                  ⁢                dt                                      +                                          K                d                            ⁢                              d                dt                            ⁢                                                e                  L                                ⁡                                  (                  t                  )                                                      +            C                          ⁢                                  ⁢                              O            ⁡                          (              t              )                                =                      output            ⁢                                                  ⁢            value                          ⁢                                  ⁢                                            e              L                        ⁡                          (              t              )                                =                      difference            ⁢                                                  ⁢            between            ⁢                                                  ⁢            desired            ⁢                                                  ⁢            value            ⁢                                                  ⁢            and            ⁢                                                  ⁢                          present              ⁢                                                          ⁢                                                          (                              time                ⁢                                                                  ⁢                t                            )                        ⁢                                                  ⁢            value            ⁢                                                  ⁢            of            ⁢                                                  ⁢            controlled            ⁢                                                  ⁢            object                          ⁢                                  ⁢                              K            p                    =                      gain            ⁢                                                  ⁢            of            ⁢                                                  ⁢            propotional            ⁢                                                  ⁢            term            ⁢                                                  ⁢            for            ⁢                                                  ⁢            PID            ⁢                                                  ⁢            control                          ⁢                                  ⁢                              K            i                    =                      gain            ⁢                                                  ⁢            of            ⁢                                                  ⁢            integral            ⁢                                                  ⁢            term            ⁢                                                  ⁢            for            ⁢                                                  ⁢            PID            ⁢                                                  ⁢            control                          ⁢                                  ⁢                              K            d                    =                      gain            ⁢                                                  ⁢            of            ⁢                                                  ⁢            derivative            ⁢                                                  ⁢            term            ⁢                                                  ⁢            for            ⁢                                                  ⁢            PID            ⁢                                                  ⁢            control                          ⁢                                  ⁢                  C          =                      offset            ⁢                                                  ⁢            for            ⁢                                                  ⁢            PID            ⁢                                                  ⁢            control                                              (        1        )            
In the case where a feed rate is controlled such that a spindle load becomes constant, the spindle load can be brought close to a desired value by assigning an override (feed rate) to O(t), assigning the difference between a desired spindle load and a spindle load at time t to eL(t), and assigning an appropriate value to the constant.
In a state in which cutting is not being performed, that is, when a spindle is running idle, the spindle load does not vary even if the feed rate is increased. Accordingly, it is desirable that PID control is performed only when cutting is being performed, that is, only when the spindle load is not less than a constant value. In the above-described equation (1), to denotes the time when PID control is started.
FIGS. 7 and 8 are views showing changes in a cut depth, an override, and a spindle load when a tool cuts into a workpiece in general PID control. It should be noted that FIG. 7 shows the case where a cut depth is large, and FIG. 8 shows the case where a cut depth is small.
In simple PID control, no offset is included, and the value of the integral term on the right-hand side of equation (1) at the start of control is 0. Accordingly, when control is started, the override decreases once and then comes close to the desired value as shown in FIGS. 7 and 8.
FIGS. 9 and 10 are views showing changes in a cut depth, an override, and a spindle load when a tool cuts into a workpiece in PID control in which a constant value is assigned to the offset. It should be noted that FIG. 9 shows the case where a cut depth is large, and FIG. 10 shows the case where a cut depth is small.
In the case where the offset is equal to the override when an equilibrium state is reached, the equilibrium state is instantaneously established as shown in FIG. 9. However, in the case where the offset and the override in an equilibrium state differ due to a change in the cut depth, there is a possibility that the override decreases once and then reaches an equilibrium state as shown in FIG. 10.
The above-described prior art technique has a problem that the override becomes discontinuous when control is switched if control is performed without assigning an initial value to the integral term or the offset. Moreover, even in the case where an initial value is assigned to the integral term or the offset, there is a problem that merely assigning a constant may be not enough to prevent the override from becoming discontinuous due to variations in the override or variations in the cut depth just before control.